LensPatchAIV_NJB
Lens patch for Apple Immersive Video in DaVinci Resolve
=======================================================
Version 1.0 - 2026-11-14

This effect macro was created by Nick Brazzi with Claude AI.
Visit www.bestseatimmersive.com for information and tutorials.
Provided as is, without warranty. Test before using on client work.

WHAT IT DOES
------------
This tool is meant for Apple Immersive Video shot with the
Blackmagic URSA Cine Immersive camera, edited in an Apple
Immersive project in DaVinci Resolve Studio.

Each of the camera's two lenses can see the other lens at the
edge of its image. In the LEFT eye the neighbouring lens shows at
the RIGHT edge of the frame; in the RIGHT eye it shows at the
LEFT edge.

LensPatchAIV covers each lens with matching image taken from the
other eye, for both eyes at once. It also trims the edge of the
frame slightly (see WHAT IT CROPS, AND WHY). It is a Fusion page
tool: you add it to a clip's Fusion composition.


WHAT IT CROPS, AND WHY
----------------------
In addition to patching the lenses, LensPatchAIV crops the frame
a little. The picture ends in a smooth, slightly oval edge
instead of the camera's original edge. You lose very little on
the left and right, and a little more at the top and bottom.

Why:
- The camera's lens calibration only describes the image out to
  a certain distance from the centre. Image recorded beyond that
  point cannot be placed accurately in the headset, so it appears
  stretched and makes a visible bump at the edge of the picture.
- At the top and bottom, the round image is cut off flat by the
  edge of the frame. In the headset that flat cut also shows as
  an uneven edge.
The tool trims the picture to a smooth edge that stays inside
the calibrated area and clears the top and bottom of the frame,
so the edge looks clean and consistent in the headset.


COMPATIBILITY
-------------
This Lens Patcher tool may not be compatible with stabilization
or other effects in Fusion.

This tool works when the timeline resolution matches the
resolution of the source clips. If you have a sequence that
contains immersive clips at different resolutions, this tool
will likely not work.


REQUIREMENTS
------------
- DaVinci Resolve Studio for macOS with Apple Immersive Video
  support (Resolve 20.1 or later; built and tested in Resolve 21).
- Apple Immersive Video footage from the Blackmagic URSA Cine
  Immersive, in an Apple Immersive project.


INSTALLING
----------
There are two ways to install. Choose one.

Option A - double-click (easiest)
  1. Open DaVinci Resolve.
  2. Double-click LensPatchAIV_NJB.drfx
     (or drag it onto the Fusion page).
  3. Click Install when Resolve asks.
  4. Restart Resolve.
  The tool appears on the Fusion page in the Effects panel under
  Templates > Fusion. It does NOT appear in the Add Tool menu or
  the Shift+Space list.

Option B - manual (adds the tool to Shift+Space and Add Tool)
  Copy LensPatchAIV_NJB.setting into your Fusion Macros folder,
  then restart Resolve.

  Mac
    The Library folder is hidden, so it doesn't show in Finder
    normally. To get to the Macros folder:
      1. In Finder, hold down the Option key and click the Go menu
         at the top of the screen. Library appears in the list
         while Option is held down. Click Library.
      2. In the Library folder, open these folders in order:
           Application Support > Blackmagic Design >
           DaVinci Resolve > Fusion > Macros
      3. Drag LensPatchAIV_NJB.setting into the Macros folder.
    The full path is:
      ~/Library/Application Support/Blackmagic Design/
      DaVinci Resolve/Fusion/Macros/
    (~ is your home folder, the one with your user name.)

  The tool then appears when you press Shift+Space on the Fusion
  page and type LensPatchAIV, and in the node area's right-click
  menu under Add Tool > Macros.


ADDING IT TO A CLIP
-------------------
  1. On the Edit page, select the clip and open the Fusion page.
     The clip's composition has MediaIn1 (left eye), MediaIn2
     (right eye), MediaOut1 and MediaOut2.
  2. Add LensPatchAIV_NJB:
       Option A install: Effects panel > Templates > Fusion, then
       drag it onto the node area.
       Option B install: press Shift+Space and type LensPatchAIV.
  3. Connect it:
       MediaIn1  -> Input 1 (yellow input)
       MediaIn2  -> Input 2 (green input)
       Output 1 (main output box)          -> MediaOut1
       Output 2 (small box under the node) -> MediaOut2
     Hover over an input or output to see its name.


ADJUSTING THE PATCH
-------------------
Select the LensPatchAIV node and use its Inspector.

Preview
  Choose Show Left Eye or Show Right Eye, then adjust that eye's
  controls. In preview mode the chosen eye is shown on both
  outputs, the main image turns grey, the patch stays in colour,
  and a "PREVIEW" warning appears in the centre of the frame.

Left / Right Patch Adjustments (one group per eye)
  Border Position  How far the patch reaches in from the frame
                   edge. Move it as close to the edge as possible
                   without revealing the lens.
  Patch Position   Slides the borrowed image to line it up with
                   the surrounding image.
  Patch Angle      Very small rotation (slider -1 to +1 degree).
  Patch Size       Scales the borrowed image.
  Mask Feather     Softens the edge of the patch.

Edge Crop (both eyes)
  Crop Width / Crop Height  Size of the edge crop. Leave these at
                   their defaults unless the edge of the picture
                   shows a bump or a flat section in the headset.

To view the right eye on the Edit page, use View > Stereoscopic 3D.


BEFORE RENDERING
----------------
Set Preview back to "Off (Render)". If you forget, the grey
preview image and the warning text will be rendered into your
video. Check the result in a headset before delivering.


UPDATING OR REMOVING
--------------------
- Installed with the .drfx: to update, install the newer .drfx and
  choose to overwrite. To remove, on the Fusion page open the
  Effects library > Templates, right-click > Show Folder, delete
  LensPatchAIV_NJB.drfx, then restart Resolve.
- Installed manually: replace or delete the .setting file in the
  Macros folder, then restart Resolve.
- Clips that already use the tool keep their own copy; re-add the
  tool to a clip to pick up a newer version.
- To see which version a clip is using, open Setup Instructions in
  the tool's Inspector: the first line shows the version number.


TROUBLESHOOTING
---------------
The edge of the picture shows a bump or a flat section
  -> Adjust Crop Width / Crop Height slightly.

The lens is still visible
  -> Move Border Position closer to the centre of the frame.

The right eye is not patched in the export
  -> Check the wiring: Output 2 must go to MediaOut2.

I can't find the tool after installing
  -> Restart Resolve first.
  -> Option A (.drfx): look in the Effects panel under
     Templates > Fusion.
  -> Option B (.setting): press Shift+Space on the Fusion page and
     type LensPatchAIV. If it is missing, check the file is in the
     Macros folder (not a subfolder) and ends in .setting.


VERSION HISTORY
---------------
1.0 (2026-11-14)
  First release.
